import { Injectable } from '@nestjs/common';
import { CreateNoticeDto } from './dto/create-notice.dto';
import { UpdateNoticeDto } from './dto/update-notice.dto';

@Injectable()
export class NoticesService {
  create(createNoticeDto: CreateNoticeDto) {
    return 'This action adds a new notice';
  }

  findAll() {
    return `This action returns all notices`;
  }

  findOne(id: number) {
    return `This action returns a #${id} notice`;
  }

  update(id: number, updateNoticeDto: UpdateNoticeDto) {
    return `This action updates a #${id} notice`;
  }

  remove(id: number) {
    return `This action removes a #${id} notice`;
  }

  myPage() {
    return {
      list: [
        {
          id: '122',
          title: 'q',
          type: 1,
          level: 'L',
          publisherName: '系统管理员',
          publishTime: '2025-04-08 23:41',
          isRead: 1,
        },
        {
          id: '125',
          title: '111111111',
          type: 1,
          level: 'L',
          publisherName: '系统管理员',
          publishTime: '2025-04-08 23:40',
          isRead: 1,
        },
        {
          id: '123',
          title: '测试通知',
          type: 99,
          level: 'L',
          publisherName: '系统管理员',
          publishTime: '2025-04-08 10:48',
          isRead: 1,
        },
      ],
      total: 3,
    };
  }
}
